import instance from '@/axios/index'


//获取sku列表
export const getSkuList = async(id:any) => {
    const res = await instance.post('/Goods/goodssku?id=',{goods_id:id})

    return res.data.data
}

//添加功能
export const addSku = async(data:any) => {
    const res = await instance.post('/Goods/addSku',data)

    return res.data.data
}

//回显功能
export const getSkuInfo = async(id:any) => {
    const res = await instance.post('/Goods/editSku',{id:id})

    return res.data.data
}

//修改功能
export const editSku = async(data:any) => {
    const res = await instance.post('/Goods/editSkuTo',data)
    console.log(res);
    

    return res.data.data
}

//删除功能
export const delSku = async(id:any) => {
    const res = await instance.post('/Goods/deleteSku',{id:id})

    return res.data.data
}